﻿/***************************************************************
 * Name:      cloudown_main.h
 * Purpose:   应用程序框架类定义
 * Author:    杨卓荦 (yzl@bang5.net)
 * Created:   2010-08-29
 * Copyright: 杨卓荦 (http://www.bang5.net)
 * License:
 **************************************************************/

#ifndef CLOUDOWNMAIN_H
#define CLOUDOWNMAIN_H

//(*Headers(ClouDownFrame)
#include <wx/listctrl.h>
#include <wx/treectrl.h>
#include <wx/menu.h>
#include <wx/textctrl.h>
#include <wx/splitter.h>
#include <wx/toolbar.h>
#include <wx/frame.h>
#include <wx/timer.h>
#include <wx/statusbr.h>
//*)

#include "task_manager.h"
class ClouDownFrame: public wxFrame {
public:

  ClouDownFrame(wxWindow* parent, wxWindowID id = -1);
  virtual ~ClouDownFrame();

  TaskManager& GetTaskManager() { return task_manager_; }
  wxListCtrl& GetDownloadingCtrl() { return *list_ctrl_downloading; }

private:
  // 任务管理器
  TaskManager task_manager_;

  //(*Handlers(ClouDownFrame)
  void OnQuit(wxCommandEvent& event);
  void OnAbout(wxCommandEvent& event);
  void OnToolbarItemNewTaskClicked(wxCommandEvent& event);
  void OnTimerTrigger(wxTimerEvent& event);
  //*)

  //(*Identifiers(ClouDownFrame)
  static const long kIdTreeCtrlLeft;
  static const long kIdListCtrlDownloading;
  static const long kIdTextCtrlInfo;
  static const long kIdSplitterWindowRight;
  static const long kIdSplitterWindowMain;
  static const long kIdMenuQuit;
  static const long kIdMenuAbout;
  static const long kIdStatusBarMain;
  static const long kIdNewTask;
  static const long kIdToolBarMain;
  static const long kIdTimer;
  //*)

  //(*Declarations(ClouDownFrame)
  wxToolBar* tool_bar;
  wxTimer timer;
  wxSplitterWindow* splitterwindow_main;
  wxSplitterWindow* splitterwindow_right;
  wxTreeCtrl* treectrl_left;
  wxStatusBar* status_bar;
  wxListCtrl* list_ctrl_downloading;
  wxToolBarToolBase* toolbar_item_new_task;
  wxTextCtrl* text_ctrl_info;
  //*)

  DECLARE_EVENT_TABLE()
};

#endif // CLOUDOWNMAIN_H
